package com.zsl.swing.redis.desktop.window.builder;

import com.zsl.swing.redis.desktop.type.UnitTypeEnum;

import javax.swing.*;

public class UnitTypeComboBoxBuilder {

    private UnitTypeComboBoxBuilder(){}

    public static JComboBox<String> getInstance(){
        JComboBox<String> comboBox = new JComboBox<>();
        comboBox.addItem(UnitTypeEnum.MILLIS.getUnitName());
        comboBox.addItem(UnitTypeEnum.SECONDS.getUnitName());
        comboBox.addItem(UnitTypeEnum.MINUTES.getUnitName());
        comboBox.addItem(UnitTypeEnum.HOURS.getUnitName());
        comboBox.addItem(UnitTypeEnum.DAYS.getUnitName());
        return comboBox;
    }
}
